import {
	request,
	uploadReq
} from "@/util/request.js";
import {
	obj2Url,
	addAccessToken
} from "@/util";

export function sendVerifyCode(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/SMS/SendVerifyCode.aspx?" + params);
}

export function uploadFile(paramsObj, data) {
	const params = obj2Url(addAccessToken(paramsObj));
	return uploadReq("get", "/v2/UploadFile.aspx?" + params, data);
}

export function getZoneInfo(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/Location/GetZoneInfo.aspx?" + params);
}

export function getPartnerList(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/Partner/PartnerList.aspx?" + params);
}

export function getEmployeeList(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/Employee/EmployeeList.aspx?" + params);
}

export function getPhraseList(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/Phrase/PhraseList.aspx?" + params);
}

export function addrIdentify(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/Addr/AddrIdentify.aspx?" + params);
}